<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
  </head>
  <body></body>
  <script>
    let parent5 = {
      name: 'parent5',
      friends: ['p1', 'p2', 'p3'],
      getName: function () {
        return this.name;
      },
    };
    function clone(original) {
      let clone = Object.create(original);
      clone.getFriends = function () {
        return this.friends;
      };
      return clone;
    }
    let person5 = clone(parent5);
    console.log(person5.getName());
    console.log(person5.getFriends());
  </script>
</html>
